<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="p" uri="/WEB-INF/tld/page.tld" %>
<form id="ticket-table-form">
<table class="table table-striped table-bordered bootstrap-datatable responsive" id="ticket-table">
    <thead>
    <tr>
    	<th></th>
        <th>票品名称</th>
        <th>所属景区</th>
        <th>进价</th>
        <th>市场价</th>
        <th>库存数量</th>
        <th>有效时间</th>
        <th>有效状态</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${ticketPage.list }" var="ticket">
    <tr>
    	<td><input type="checkbox" name="ticketId" value="${ticket.ticketInfoId }"></td>
        <td>${ticket.name }</td>
        <td class="center">${ticket.scene.name }</td>
        <td class="center">${ticket.buyinPrice }</td>
        <td class="center">${ticket.listPrice }</td>
        <td class="center">${ticket.inventory }</td>
        <td class="center">${ticket.fromTime_display }-${ticket.endTime_display }</td>
        <td class="center">${ticket.isOK_display }</td>
        <td class="center">
        	<c:if test="${ticket.dicTicketStatus eq 0 }">
	        	<a href="javascript:;" class="btn btn-default" onclick='editTicketView("${ticket.ticketInfoId}");'>编辑</a>
	        	<a href="javascript:;" class="btn btn-default" onclick='jumpRelation("${ticket.ticketInfoId}");'>设置关联产品</a>
        	</c:if>
        </td>
    </tr>
    </c:forEach>
    </tbody>
</table>
</form>
<p:page pageNo="${ticketPage.pageNo }" totalPage="${ticketPage.totalPage }" 
	totalRow="${ticketPage.totalRow }"/>
<a href="javascript:;" class="btn btn-default" onclick="addview();">新增</a>
<!-- <a href="javascript:;" class="btn btn-default" onclick='removeTicket();'>删除</a> -->